import { http } from '@/utils/http/axios';

//#region  增删改查
//获取分页数据
export function getPageList(params) {
    return http.request({
        url: '/System/SysDictionary/GetPageList',
        method: 'get',
        params
    });
}

/**
 * 新增
 * @returns 
 */
export function add(data: object) {
    return http.request({
        url: '/System/SysDictionary/Add',
        method: 'POST',
        data
    });
}


/**
 * 修改
 * @returns 
 */
export function update(data: object) {
    return http.request({
        url: '/System/SysDictionary/Update',
        method: 'POST',
        data
    });
}

/**
 * 删除
 * @returns 
 */
export function deleteById(id: string) {
    return http.request({
        url: `/System/SysDictionary/Delete?id=${id}`,
        method: 'POST',
    });
}
//#endregion